import {createRouter,createWebHistory} from 'vue-router';
const Index = () => import('../pages/Index.vue')
const Character = () => import('../pages/Character.vue')
const Battle = () => import('../pages/Battle.vue')
const Ranking = () => import('../pages/Ranking.vue')
const DPSRank = () => import('../pages/DPSRank.vue')
const LingSu = () => import('../pages/LingSu.vue')
const YunChangXinJing = () => import('../pages/YunChangXinJing.vue')
const XiangZhi = () => import('../pages/XiangZhi.vue')
const LiJingYiDao = () => import('../pages/LiJingYiDao.vue')
const BuTianJue = () => import('../pages/BuTianJue.vue')

const Help = () => import('../pages/Help.vue')
const HPS = () => import('../pages/HPS.vue')

const E404 = () => import('../pages/404.vue')
const E405 = () => import('../pages/405.vue')

const router = createRouter({
    history: createWebHistory(),
    routes:[
        {
            path: "/",
            component: Index
        },
        {
            path: "/help",
            component: Help,
            children:[
                {
                    path:'hps',
                    component:HPS
                }
            ]
        },
        {
            path:"/character/:server/:name",
            component: Character
        },
        {
            path:"/ranking",
            component: Ranking,
        },
        {
            path:"/dpsrank",
            component: DPSRank,
        },
        {
            path:"/battle/:id",
            component: Battle,
        },
        {
            path:"/lingsu/:replay_id",
            component: LingSu
        },
        {
            path:"/xiangzhi/:replay_id",
            component: XiangZhi
        },
        {
            path:"/lijingyidao/:replay_id",
            component: LiJingYiDao
        },
        {
            path:"/yunchangxinjing/:replay_id",
            component: YunChangXinJing
        },
        {
            path:"/butianjue/:replay_id",
            component: BuTianJue
        },
        {
            path:'/404',
            component: E404
        },
        {
            path:'/405',
            component: E405
        },
        {
            path:"/:pathMatch(.*)",
            redirect:'/404'
        }
    ]
});

export default router;